


replace lender = "AV" if regexm(lender,"AV ")==1  | regexm(lender, "AVATAR")==1 
replace lender = "BEAZER" if regexm(lender,"BEAZER")==1 
replace lender = "CENTEX" if regexm(lender,"CTX ")==1 
replace lender = "CALATLANTIC" if regexm(lender,"STANDARD PAC")==1
replace lender = "CAPITALPACIFIC" if regexm(lender,"CAPITAL PACIFIC")==1
replace lender = "DRHORTON" if regexm(lender,"DHI ")==1
replace lender = "KB" if regexm(lender,"KAUFMAN ")==1
replace lender = "KIMBALLHILL" if regexm(lender,"KH F")==1 | regexm(lender,"KH M")==1
replace lender = "M/I" if regexm(lender,"MI FIN")==1
replace lender = "MDC" if regexm(lender,"HOMEAMERICAN MTG CORP")==1
replace lender = "MERITAGE" if regexm(lender,"MTH ")==1
replace lender = "TAYLORMORRISON" if regexm(lender,"TAYLOR MORRISON")==1
replace lender = "TOLLBROTHERS" if regexm(lender,"TBI ")==1 
replace lender = "WCICOMMUNITIES" if regexm(lender,"WCI ")==1
replace lender = "WILLIAMLYON" if regexm(lender,"WILLIAM LYON")==1

replace lender = subinstr(lender," MTG","",.)
replace lender = subinstr(lender," CO","",.)
replace lender = subinstr(lender," LLC","",.)
replace lender = subinstr(lender," HM","",.)
replace lender = subinstr(lender," BK","",.)
replace lender = subinstr(lender," INC","",.)
replace lender = subinstr(lender," GRP","",.)

replace lender = subinstr(lender," ","",.)
